package com.goktech.controller;

import com.goktech.pojo.Image;
import com.goktech.service.ImageService;
import com.goktech.utils.Result;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;

import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;
import java.util.List;

/**
 * <p>
 * 商品详情图片表 前端控制器
 * </p>
 *
 * @author 初茶
 * @since 2023-05-14
 */
@RestController
@RequestMapping("/image")
public class ImageController {
    @Resource
    private ImageService imageService;

    @GetMapping("/goodsImage/{id}")
    public Result<List<Image>> goodsImage(@PathVariable Integer id) {
        return imageService.goodsImage(id);
    }
}

